/**
 * Created by Freeman on 2016/6/28.
 */
import {STORAGE_KEY} from './store'
import createLogger from 'vuex/logger'

const localStorageMiddleware ={
    onMutation(mutation,{todos}){
        localStorage.setItem(STORAGE_KEY,JSON.stringify(todos))
    }
}

export default process.env.NODE_ENV !== 'production'?
    [createLogger(),localStorageMiddleware]:''